#include "informationcontroller.h"

InformationController::InformationController()
{


    informationView = new InformationView();

    speedometerController = new SpeedometerController();
    speedometerController->setTrainRunState(TrainRunState::COUNTDOWN,100,385);
    speedometerController->setStationLabel(134.88);
    speedometerController->show(informationView->vLayout,372);

    trainStatusController = new TrainStatusController();
    trainStatusController->show(informationView->vLayout,62);

    messageListController = new MessageListController();
    messageListController->show(informationView->vLayout,124);

}


//添加页面
void InformationController::show(QHBoxLayout *hLayout, int stretch)
{
    hLayout->addWidget(informationView,stretch);
}

void InformationController::setAccelerateFun()
{
    speedometerController->setAccelerateFun();
}

void InformationController::setRetardFun()
{
 speedometerController->setRetardFun();
}



InformationController::~InformationController()
{

}
